Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootloaders/riotboot: add tinyUSB DFU support #19010

Merged
merged 11 commits into from
Jan 16, 2023

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Dec 5, 2022

Contribution description

This PR provides

  • the tinyUSB DFU and DFU Runtime support and
  • the riotboot_tinyusb_dfu bootloader that uses the tinyUSB DFU mode to flash new application images.

This PR includes PR #18983 for now to be compilable.

Testing procedure

  1. Use any board that supports the riotboot´ and tinyusb_device` features and flash the bootloader first, for example
    BOARD=nucleo-f767zi make -C bootloaders/riotboot_tinyusb_dfu flash
    
    and check that the riotboot_tinyusb_dfu bootloader is in DFU mode:
    dfu-util --list
    
  2. Flash a first application using the following command:
    FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
    make -C tests/saul PROGRAMMER=dfu-util riotboot/flash-slot0
    
    and check that the application starts and is seen as upgradable:
    dfu-util --list
    
  3. Restart the node in bootloader DFU mode by:
    dfu-util -e
    
    Flash a second application, for example
    FEATURES_REQUIRED=riotboot USEMODULE=tinyusb_dfu BOARD=nucleo-f767zi \
    make -C tests/shell PROGRAMMER=dfu-util riotboot/flash-slot1
    
    and check that the second application starts and is seen as upgradable:
    dfu-util --list
    

Issues/PRs references

Depends on PR #18983

@github-actions github-actions bot added Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: sys Area: System Platform: ARM Platform: This PR/issue effects ARM-based platforms labels Dec 5, 2022
@gschorcht gschorcht added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 5, 2022
@gschorcht gschorcht requested review from benpicco and dylad December 5, 2022 07:53
@riot-ci
Copy link

riot-ci commented Dec 5, 2022

Murdock results

✔️ PASSED

3d4e8d6 makefiles/boot/riotboot-dfu-util: add tinyusb_dfu support

Success Failures Total Runtime
6773 0 6775 13m:31s

Artifacts

@gschorcht gschorcht added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Dec 5, 2022
@gschorcht gschorcht requested a review from fjmolinas as a code owner December 5, 2022 19:47
@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 6, 2022
@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 7, 2022
pkg/tinyusb/hw/hw_sam0.c Outdated Show resolved Hide resolved
pkg/tinyusb/dfu/tinyusb_dfu.c Outdated Show resolved Hide resolved
@benpicco
Copy link
Contributor

bors try

bors bot added a commit that referenced this pull request Jan 15, 2023
@bors
Copy link
Contributor

bors bot commented Jan 15, 2023

try

Build succeeded:

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash

@benpicco
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 16, 2023

Build succeeded:

@bors bors bot merged commit 9ff9704 into RIOT-OS:master Jan 16, 2023
@gschorcht
Copy link
Contributor Author

Thanks

@gschorcht gschorcht deleted the pkg/tinyusb_dfu branch February 4, 2023 12:16
@jia200x jia200x added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration Area: pkg Area: External package ports Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants